package org.example.util;

import com.google.common.collect.Lists;

import java.util.List;
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.Future;

/**
 * @author yangzhenyu
 * @version 1.0
 * @description:
 * @date 2023/4/27 17:42
 */
public class ListQueue {
    private  static ConcurrentLinkedDeque<Future<List<Integer>>> list = null;

    static {
        new ListQueue();
    }
    public ListQueue() {
        ListQueue.list = new ConcurrentLinkedDeque<Future<List<Integer>>>();
    }


    //唯一实例
    public static class  SingletonHolder{
        public static ConcurrentLinkedDeque<Future<List<Integer>>> getQueue() {
            return ListQueue.list;
        }
    }

    //获取该实例
    public static ConcurrentLinkedDeque<Future<List<Integer>>> getQueue(){
        return SingletonHolder.getQueue();
    }
}
